import request from '@/utils/request';
export async function createVoteWithOption(params: any) {
  return request('/api/v1/vote/createVoteWithOption', {
    method: 'POST',
    data: params,
  });
}
export async function deleteVoteById(params: any) {
  return request('/api/v1/vote/deleteVoteById', {
    method: 'POST',
    params: params,
  });
}
export async function getVoteByVoteId(params: any) {
  return request('/api/v1/vote/getVoteByVoteId', {
    method: 'POST',
    params: params,
  });
}
export async function publishVote(params: any) {
  return request('/api/v1/vote/publishVote', {
    method: 'POST',
    params: params,
  });
}
export async function submitVote(params: any) {
  return request('/api/v1/vote/submitVote', {
    method: 'POST',
    params: params,
  });
}
export async function updateVote(params: any) {
  return request('/api/v1/vote/updateVote', {
    method: 'POST',
    data: params,
  });
}
export async function getVoteList(params: any) {
  return request('/api/v1/vote/getVoteList', {
    method: 'POST',
    data: params,
  });
}

export async function getInvolvedVoteList(params: any) {
  return request('/api/v1/vote/getInvolvedVoteList', {
    method: 'POST',
    data: params,
  });
}
export async function getVoteResultList(params: any) {
  return request('/api/v1/vote/getVoteResultList', {
    method: 'POST',
    data: params,
  });
}

export async function getVoteOptionByVoteId() {
  return request('/api/v1/vote/getVoteOptionByVoteId', {
    method: 'GET',
  });
}
